package com.lch.service.impl;

import com.lch.dao.WebDao;
import com.lch.domain.People;
import com.lch.service.WebService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WebServiceImpl implements WebService {

    @Autowired
    private WebDao webDao;

    @Override
    public String select() {
        try {
            List<People> people = webDao.selectData();
            if (null != people && people.size() > 0) {
                return "查询成功";
            }
        } catch (Exception e) {
            System.out.println(e.toString());
            throw new RuntimeException("出异常了");
        }
        return "查询失败";
    }
}
